import java.util.HashMap;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: fzykd
 * Date: 2023-04-18
 * Time: 15:10
 */

public class Weekly implements Cloneable{

    //员工姓名
    private String name;

    //部门
    private String department;

    //职位
    private String position;

    //第几周
    private int week;

    //遇到的问题
    private String problem;

    //收获和体会
    private String experience;

    //周一
    private String Monday;

    //周二
    private String Tuesday;

    //周三
    private String Wednesday;

    //周四
    private String Thursday;

    //周五
    private String Friday;

    //周六
    private String Saturday;

    //周天
    private String Sunday;

    @Override
    protected Object clone() {
        Weekly weekly = null;
        try {
            weekly = (Weekly) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new RuntimeException(e);
        }
        return weekly;
    }


    public Weekly(String name, String department, String position, int week) {
        this.name = name;
        this.department = department;
        this.position = position;
        this.week = week;
    }
    //周几 和 报告的对应关系
    private Map<Integer,String> map = new HashMap<>();
    //第几周和 周几的对应关系
    private Map<Integer,Map<Integer,String>> mapDay = new HashMap<>();

    public void write(int week,int day, String test) {
        switch (day){
            case 1:
                map.put(1,test);
                this.Monday = test;
                break;
            case 2:
                map.put(2,test);
                this.Tuesday = test;
                break;
            case 3:
                map.put(3,test);
                this.Wednesday = test;
                break;
            case 4:
                map.put(4,test);
                this.Thursday = test;
                break;
            case 5:
                map.put(5,test);
                this.Friday = test;
                break;
            case 6:
                map.put(6,test);
                this.Saturday = test;
                break;
            case 7:
                map.put(7,test);
                this.Saturday = test;
                break;
            default:
                System.out.println("不符合条件");
                break;
        }
        mapDay.put(week,map);
    }

    public void read(int week){
        System.out.println(mapDay.get(week));

    }




    @Override
    public String toString() {
        return "Weekly{" +
                "name='" + name + '\'' +
                ", department='" + department + '\'' +
                ", position='" + position + '\'' +
                ", week=" + week +
                ", problem='" + problem + '\'' +
                ", experience='" + experience + '\'' +
                "\r\n" +
                ", Monday='" + Monday + '\'' +
                ", Tuesday='" + Tuesday + '\'' +
                ", Wednesday='" + Wednesday + '\'' +
                ", Thursday='" + Thursday + '\'' +
                ", Friday='" + Friday + '\'' +
                ", Saturday='" + Saturday + '\'' +
                ", Sunday='" + Sunday + '\'' +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDepartment() {
        return department;
    }

    public void setDepartment(String department) {
        this.department = department;
    }

    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position;
    }

    public int getWeek() {
        return week;
    }

    public void setWeek(int week) {
        this.week = week;
    }

    public String getProblem() {
        return problem;
    }

    public void setProblem(String problem) {
        this.problem = problem;
    }

    public String getExperience() {
        return experience;
    }

    public void setExperience(String experience) {
        this.experience = experience;
    }
    public String getMonday() {
        return Monday;
    }

    public void setMonday(String monday) {
        Monday = monday;
    }

    public String getTuesday() {
        return Tuesday;
    }

    public void setTuesday(String tuesday) {
        Tuesday = tuesday;
    }

    public String getWednesday() {
        return Wednesday;
    }

    public void setWednesday(String wednesday) {
        Wednesday = wednesday;
    }

    public String getThursday() {
        return Thursday;
    }

    public void setThursday(String thursday) {
        Thursday = thursday;
    }

    public String getFriday() {
        return Friday;
    }

    public void setFriday(String friday) {
        Friday = friday;
    }

    public String getSaturday() {
        return Saturday;
    }

    public void setSaturday(String saturday) {
        Saturday = saturday;
    }

    public String getSunday() {
        return Sunday;
    }

    public void setSunday(String sunday) {
        Sunday = sunday;
    }

}
